package com.brainshare.common.enums;

import java.util.ArrayList;
import java.util.List;

/**
 * 教育程度枚举
 * @author wll
 */
public enum EducationEnum {

    BELOW_ELEMENTARY_SCHOOL("0","小学以下"),
    JUNIOR_MIDDLE_SCHOOL("2","初中"),
    SENIOR_MIDDLE_SCHOOL("3","高中"),
    JUNIOR_COLLEGE("4","大专"),
    REGULAR_COLLEGE_COURSE("5","本科"),
    MASTER("6","硕士"),
    DOCTOR("7","博士");

    private final String code;
    private final String info;

    EducationEnum(String code, String info) {
        this.code = code;
        this.info = info;
    }

    public static boolean isValidateEducationCode(String code) {
        List<String> list =  getEducationCodeList();
        return list.contains(code);
    }

    /**
     * 获取性别编码列表
     *
     * @return
     */
    public static List<String> getEducationCodeList() {
        List<String> list = new ArrayList<>(2);
        for (EducationEnum educationEnum : EducationEnum.values()) {
            list.add(educationEnum.code);
        }
        return list;
    }
}
